package com.mars.foodserver.controller.admin;

import com.mars.foodserver.request.FoodTypeRequest;
import com.mars.foodserver.response.base.BasePageRequest;
import com.mars.foodserver.response.result.R;
import com.mars.foodserver.service.IFoodNotesService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import lombok.AllArgsConstructor;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author wq
 * @since 2021-07-21
 */
@RestController
@RequestMapping("admin/food/notes")
@AllArgsConstructor
public class AdminFoodNotesController {

    final IFoodNotesService foodNotesService;


    /**
     * 分页
     *
     * @param request 请求参数
     * @return R
     */
    @PostMapping("/page")
    private R page(@RequestBody BasePageRequest request) {
        return R.success(foodNotesService.page(request));
    }
}
